@inject NavigationManager Navigation

@code {

    protected override void OnInitialized()
    {
        Navigation.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}", true);
    }

}   